(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)))
sqr(0) → 0
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0) → 0
dbl(s(X)) → s(s(dbl(X)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y)) → cons(Y)

Rewrite Strategy: FULL

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

S is empty.
Rewrite Strategy: FULL

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
sqr, add, dbl

They will be analysed ascendingly in the following order:
add < sqr
dbl < sqr

(6) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
add, sqr, dbl

They will be analysed ascendingly in the following order:
add < sqr
dbl < sqr

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
add(gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
gen_0':s4_0(b)

Induction Step:
add(gen_0':s4_0(+(n6_0, 1)), gen_0':s4_0(b)) →RΩ(1)
s(add(gen_0':s4_0(n6_0), gen_0':s4_0(b))) →IH
s(gen_0':s4_0(+(b, c7_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
dbl, sqr

They will be analysed ascendingly in the following order:
dbl < sqr

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
dbl(gen_0':s4_0(n495_0)) → gen_0':s4_0(*(2, n495_0)), rt ∈ Ω(1 + n4950)

Induction Base:
dbl(gen_0':s4_0(0)) →RΩ(1)
0'

Induction Step:
dbl(gen_0':s4_0(+(n495_0, 1))) →RΩ(1)
s(s(dbl(gen_0':s4_0(n495_0)))) →IH
s(s(gen_0':s4_0(*(2, c496_0))))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n495_0)) → gen_0':s4_0(*(2, n495_0)), rt ∈ Ω(1 + n4950)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
sqr

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
sqr(gen_0':s4_0(n739_0)) → gen_0':s4_0(*(n739_0, n739_0)), rt ∈ Ω(1 + n7390 + n73902 + n73903)

Induction Base:
sqr(gen_0':s4_0(0)) →RΩ(1)
0'

Induction Step:
sqr(gen_0':s4_0(+(n739_0, 1))) →RΩ(1)
s(add(sqr(gen_0':s4_0(n739_0)), dbl(gen_0':s4_0(n739_0)))) →IH
s(add(gen_0':s4_0(*(c740_0, c740_0)), dbl(gen_0':s4_0(n739_0)))) →LΩ(1 + n7390)
s(add(gen_0':s4_0(*(n739_0, n739_0)), gen_0':s4_0(*(2, n739_0)))) →LΩ(1 + n73902)
s(gen_0':s4_0(+(*(n739_0, n739_0), *(2, n739_0))))

We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).

(14) Complex Obligation (BEST)

(15) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n495_0)) → gen_0':s4_0(*(2, n495_0)), rt ∈ Ω(1 + n4950)
sqr(gen_0':s4_0(n739_0)) → gen_0':s4_0(*(n739_0, n739_0)), rt ∈ Ω(1 + n7390 + n73902 + n73903)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(16) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_0':s4_0(n739_0)) → gen_0':s4_0(*(n739_0, n739_0)), rt ∈ Ω(1 + n7390 + n73902 + n73903)

(17) BOUNDS(n^3, INF)

(18) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n495_0)) → gen_0':s4_0(*(2, n495_0)), rt ∈ Ω(1 + n4950)
sqr(gen_0':s4_0(n739_0)) → gen_0':s4_0(*(n739_0, n739_0)), rt ∈ Ω(1 + n7390 + n73902 + n73903)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_0':s4_0(n739_0)) → gen_0':s4_0(*(n739_0, n739_0)), rt ∈ Ω(1 + n7390 + n73902 + n73903)

(20) BOUNDS(n^3, INF)

(21) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n495_0)) → gen_0':s4_0(*(2, n495_0)), rt ∈ Ω(1 + n4950)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(22) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(23) BOUNDS(n^1, INF)

(24) Obligation:

TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(26) BOUNDS(n^1, INF)